package com.xyzh.application.common.exceptionHandler;

/**
 * @author: ZJH
 * @date: 2022/11/10 13:59
 * @description: 业务异常
 */
public class ServiceException extends RuntimeException{

    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误提示
     */
    private String message;

    public ServiceException(){

    }

    public ServiceException(String message)
    {
        this.message = message;
    }

    public ServiceException(String message, Integer code){
        this.message = message;
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
